<template>
	<view class="content">
		<u-input ref="Uinput" placeholder="请输入内容" :selectionEnd="selectionEnd" :selectionStart="selectionStart" border="surround" v-model="text" @change="change" @focus="handleFocus" :focus="true"></u-input>
	</view>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';

const text = ref('sdfvdfv');

const Uinput = ref();

const selectionStart = ref(0);
const selectionEnd = computed(()=> text.value.length);

const change = (e) => {
	console.log('change', e);
};

const handleFocus = (e) => {
	uni.hideKeyboard();
}

</script>

<style lang="scss" scoped>
.content {
	padding: $uni-page-padding;
}
</style>
